package com.sg.service.biz.bff.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.service.biz.bff.SchemeOpenRecordService;
import com.wicket.okrapp.integration.EvaThemeService;
import com.wicket.okrapp.integration.OffStateService;
import com.wicket.okrapp.integration.PlanDataService;
import com.wicket.okrapp.integration.dto.*;
import com.sg.common.exception.Assert;
import com.wicket.okrcomponent.integration.DivineDataService;
import com.wicket.okrcomponent.integration.SchemeOpenRecordService;
import com.wicket.okrcomponent.integration.dto.*;
import com.wicket.okrframework.integration.BaseService;
import com.wicket.okrframework.integration.InductionRecordService;
import com.wicket.okrframework.integration.OrgService;
import com.wicket.okrframework.integration.dto.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class SchemeOpenRecordServiceImpl implements SchemeOpenRecordService {

    @Resource
    com.sg.service.biz.component.SchemeOpenRecordService fwCompSchemeOpenRecordClient;
    @Resource
    com.sg.service.biz.framework.BaseService fwBaseBaseClient;
    @Resource
    com.sg.service.biz.framework.OrgService fwBaseOrgClient;
    @Resource
    com.sg.service.biz.app.EvaThemeService fwAppEvaThemeClient;
    @Resource
    com.sg.service.biz.app.PlanDataService fwAppPlanDataClient;
    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;
    @Resource
    private RedisUtil redisUtil;
    @Resource
    com.sg.service.biz.component.DivineDataService fwCompDivineDataClient;
    @Resource
    com.sg.service.biz.app.OffStateService fwAppOffStateClient;


    /**
     * B2-3查询应用实例配置关系列表(边界)[2102]
     * gen by moon at 11/9/2022, 1:02:19 AM
     */
    @Trace(operationName = "B2-3查询应用实例配置关系列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryApplexConrelListBorderRespDto queryApplexConrelListBorder(BffQueryApplexConrelListBorderReqDto reqDto) {


        QueryApplexConrelListRespDto queryApplexConrelListRespDto_1 = null;
        BatchQuerySpaceComRespDto batchQuerySpaceComRespDto_1 = null;
        BatchQueryOrgListBorderRespDto batchQueryOrgListBorderRespDto_1 = null;
        BatchQueryEvaThemeListRespDto batchQueryEvaThemeListRespDto_1 = null;
        BatchQueryEvaTempRespDto batchQueryEvaTempRespDto_1 = null;
//virtualUsage D2-3查询应用实例配置关系列表  2388
        QueryApplexConrelListRespDto queryApplexConrelListRespDto = null;
        QueryApplexConrelListReqDto queryApplexConrelListReqDto = new QueryApplexConrelListReqDto();
        if (reqDto != null) {
            queryApplexConrelListReqDto.setConfSchemeId(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:62394_1_2388
            queryApplexConrelListReqDto.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:62387_1_2388
        }

        /*D2-3查询应用实例配置关系列表[2143]   */
        Assert.isNull(queryApplexConrelListReqDto.getConfSchemeId(), "B2-3查询应用实例配置关系列表(边界)-D2-3查询应用实例配置关系列表-配置方案标识不能为空", false);
        Assert.isNull(queryApplexConrelListReqDto.getAscriptionSpaceId(), "B2-3查询应用实例配置关系列表(边界)-D2-3查询应用实例配置关系列表-归属空间ID不能为空", false);
        queryApplexConrelListRespDto = fwCompSchemeOpenRecordClient.queryApplexConrelList(queryApplexConrelListReqDto).getData();


        queryApplexConrelListRespDto_1 = queryApplexConrelListRespDto;
//virtualUsage D2接收输出参数(公共)  14695
        QueryOutputParametersDetailComRespDto queryOutputParametersDetailComRespDto = null;
        QueryOutputParametersDetailComReqDto queryOutputParametersDetailComReqDto = new QueryOutputParametersDetailComReqDto();


        /*D2接收输出参数(公共)[4196]   */

        queryOutputParametersDetailComRespDto = fwCompDivineDataClient.queryOutputParametersDetailCom(queryOutputParametersDetailComReqDto).getData();


        if ((queryApplexConrelListRespDto != null && queryApplexConrelListRespDto.getApplObjType() != null && queryApplexConrelListRespDto.getApplObjType().equals("TENANT_SPACE"))) {
            //if(D2-3查询应用实例配置关系列表.应用对象类型 等于 租户空间)  2389

            BatchQuerySpaceComRespDto batchQuerySpaceComRespDto = null;
            if (queryApplexConrelListRespDto != null) {
                BatchQuerySpaceComReqDto batchQuerySpaceComReqDto = new BatchQuerySpaceComReqDto();
                if (queryApplexConrelListRespDto != null) {
                    batchQuerySpaceComReqDto.setSpaceList(queryApplexConrelListRespDto.getApplexConfRelList().stream().map(item -> item.getApplexId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:62460_1_2390
                }

                /*D1-1批量查询空间(公共)[2149]   */

                batchQuerySpaceComRespDto = fwBaseBaseClient.batchQuerySpaceCom(batchQuerySpaceComReqDto).getData();
                Assert.isTrue(batchQuerySpaceComRespDto == null || batchQuerySpaceComRespDto.getSpaceList() == null || CollectionUtil.isEmpty(batchQuerySpaceComRespDto.getSpaceList()) || batchQuerySpaceComRespDto.getSpaceList().size() == 0, "返回值不能为空", false);

                batchQuerySpaceComRespDto_1 = batchQuerySpaceComRespDto;
            }
//processBranchName:正常结束 ,processBranchId:2398

        } else if ((queryApplexConrelListRespDto != null && queryApplexConrelListRespDto.getApplObjType() != null && queryApplexConrelListRespDto.getApplObjType().equals("ORG"))) {
            //elseif(D2-3查询应用实例配置关系列表.应用对象类型 等于 组织)  2392

            BatchQueryOrgListBorderRespDto batchQueryOrgListBorderRespDto = null;
            if (queryApplexConrelListRespDto != null) {
                BatchQueryOrgListBorderReqDto batchQueryOrgListBorderReqDto = new BatchQueryOrgListBorderReqDto();
                if (queryApplexConrelListRespDto != null) {
                    batchQueryOrgListBorderReqDto.setOrgList(queryApplexConrelListRespDto.getApplexConfRelList().stream().map(item -> item.getApplexId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:62450_1_2393
                }
                if (reqDto != null) {
                    batchQueryOrgListBorderReqDto.setSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:259465_1_2393
                }

                /*D1-3批量查询组织列表[2148]   */
                Assert.isNull(batchQueryOrgListBorderReqDto.getSpaceId(), "B2-3查询应用实例配置关系列表(边界)-D1-3批量查询组织列表-创建于空间ID不能为空", false);
                batchQueryOrgListBorderRespDto = fwBaseOrgClient.batchQueryOrgListBorder(batchQueryOrgListBorderReqDto).getData();
                Assert.isTrue(batchQueryOrgListBorderRespDto == null || batchQueryOrgListBorderRespDto.getOrgList() == null || CollectionUtil.isEmpty(batchQueryOrgListBorderRespDto.getOrgList()) || batchQueryOrgListBorderRespDto.getOrgList().size() == 0, "返回值不能为空", false);

                batchQueryOrgListBorderRespDto_1 = batchQueryOrgListBorderRespDto;
            }
//processBranchName:正常结束 ,processBranchId:2399

        } else if ((queryApplexConrelListRespDto != null && queryApplexConrelListRespDto.getApplObjType() != null && queryApplexConrelListRespDto.getApplObjType().equals("EVA_THEME"))) {
            //elseif(D2-3查询应用实例配置关系列表.应用对象类型 等于 评价主题)  2394

            BatchQueryEvaThemeListRespDto batchQueryEvaThemeListRespDto = null;
            if (queryApplexConrelListRespDto != null) {
                BatchQueryEvaThemeListReqDto batchQueryEvaThemeListReqDto = new BatchQueryEvaThemeListReqDto();
                if (queryApplexConrelListRespDto != null) {
                    batchQueryEvaThemeListReqDto.setEvalThemeList(queryApplexConrelListRespDto.getApplexConfRelList().stream().map(item -> item.getApplexId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:62423_1_2395
                }
                if (reqDto != null) {
                    batchQueryEvaThemeListReqDto.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:62424_1_2395
                }

                /*D3-2批量查询评价主题列表[2146]   */
                Assert.isNull(batchQueryEvaThemeListReqDto.getAscriptionSpaceId(), "B2-3查询应用实例配置关系列表(边界)-D3-2批量查询评价主题列表-归属空间ID不能为空", false);
                batchQueryEvaThemeListRespDto = fwAppEvaThemeClient.batchQueryEvaThemeList(batchQueryEvaThemeListReqDto).getData();


                batchQueryEvaThemeListRespDto_1 = batchQueryEvaThemeListRespDto;
            }
//processBranchName:正常结束 ,processBranchId:2400

        } else if ((queryApplexConrelListRespDto != null && queryApplexConrelListRespDto.getApplObjType() != null && queryApplexConrelListRespDto.getApplObjType().equals("EVA_TEMP"))) {
            //elseif(D2-3查询应用实例配置关系列表.应用对象类型 等于 评价模板)  2396

            BatchQueryEvaTempRespDto batchQueryEvaTempRespDto = null;
            if (queryApplexConrelListRespDto != null) {
                BatchQueryEvaTempReqDto batchQueryEvaTempReqDto = new BatchQueryEvaTempReqDto();
                if (queryApplexConrelListRespDto != null) {
                    batchQueryEvaTempReqDto.setEvalTempList(queryApplexConrelListRespDto.getApplexConfRelList().stream().map(item -> item.getApplexId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:104163_1_5619
                }

                /*D3-2批量查询评价模板[3074]   */

                batchQueryEvaTempRespDto = fwAppEvaThemeClient.batchQueryEvaTemp(batchQueryEvaTempReqDto).getData();


                batchQueryEvaTempRespDto_1 = batchQueryEvaTempRespDto;
            }
//processBranchName:正常结束 ,processBranchId:2401

        }
        BffQueryApplexConrelListBorderRespDto retData = new BffQueryApplexConrelListBorderRespDto();
        //数据集融合  MoreListToOneSource
        if (queryApplexConrelListRespDto_1 != null && !CollectionUtil.isEmpty(queryApplexConrelListRespDto_1.getApplexConfRelList())) {
            for (ApplexConfRelDto applexConfRelDto : queryApplexConrelListRespDto_1.getApplexConfRelList()) {
                BffApplexConfRelDto retElm = new BffApplexConfRelDto();
                if (queryApplexConrelListRespDto_1 != null) {
                    retElm.setApplexRelId(applexConfRelDto.getApplexRelId());//SimpleFieldAssign//sourceId:89888_2
                    retElm.setApplObjType(applexConfRelDto.getApplexType());//SimpleFieldAssign//sourceId:89892_2
                    retElm.setApplexId(applexConfRelDto.getApplexId());//SimpleFieldAssign//sourceId:89889_2
                }
                retData.getApplexConfRelList().add(retElm);
                if (batchQuerySpaceComRespDto_1 != null) {
                    for (FrameworkSpaceDto frameworkSpaceDto : batchQuerySpaceComRespDto_1.getSpaceList()) {
                        if (frameworkSpaceDto.getSpaceId().equals(applexConfRelDto.getApplexId())) {
                            if (batchQuerySpaceComRespDto_1 != null) {
                                retElm.setApplexId(frameworkSpaceDto.getSpaceId());//SimpleFieldAssign//sourceId:89889_2
                                retElm.setObjectName(frameworkSpaceDto.getAbbreviation());//SimpleFieldAssign//sourceId:89366_2
                            }
                        }
                    }
                }

                if (batchQueryOrgListBorderRespDto_1 != null) {
                    for (OrgDto orgDto : batchQueryOrgListBorderRespDto_1.getOrgList()) {
                        if (orgDto.getOrganizationId().equals(applexConfRelDto.getApplexId())) {
                            if (batchQueryOrgListBorderRespDto_1 != null) {
                                retElm.setApplexId(orgDto.getOrganizationId());//SimpleFieldAssign//sourceId:89889_2
                                retElm.setObjectName(orgDto.getOrganizationName());//SimpleFieldAssign//sourceId:89366_2
                            }
                        }
                    }
                }

                if (batchQueryEvaThemeListRespDto_1 != null) {
                    for (EvalThemeDto evalThemeDto : batchQueryEvaThemeListRespDto_1.getEvalThemeList()) {
                        if (evalThemeDto.getEvaluationSubjectId().equals(applexConfRelDto.getApplexId())) {
                            if (batchQueryEvaThemeListRespDto_1 != null) {
                                retElm.setApplexId(evalThemeDto.getEvaluationSubjectId());//SimpleFieldAssign//sourceId:89889_2
                                retElm.setObjectName(evalThemeDto.getEvaluationSubjectName());//SimpleFieldAssign//sourceId:89366_2
                            }
                        }
                    }
                }

                if (batchQueryEvaTempRespDto_1 != null) {
                    for (EvalTempDto evalTempDto : batchQueryEvaTempRespDto_1.getEvalTempList()) {
                        if (evalTempDto.getEvaluationTemplateId().equals(applexConfRelDto.getApplexId())) {
                            if (batchQueryEvaTempRespDto_1 != null) {
                                retElm.setApplexId(evalTempDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:89889_2
                                retElm.setObjectName(evalTempDto.getEvaluationTempShortName());//SimpleFieldAssign//sourceId:89366_2
                            }
                        }
                    }
                }

            }
        }//sourceId:62462_1


        return retData;
    }


    /**
     * B2-3查询主题方案开通记录列表(边界)[2137]
     */
    @Trace(operationName = "B2-3查询主题方案开通记录列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryThemeSchemeOpenRecordListBorderRespDto queryThemeSchemeOpenRecordListBorder(BffQueryThemeSchemeOpenRecordListBorderReqDto reqDto) {


        //步骤0: D2-3查询方案开通记录列表 - querySchemeOpenRecordList
        QuerySchemeOpenRecordListRespDto querySchemeOpenRecordListRespDto = null;
        QuerySchemeOpenRecordListReqDto querySchemeOpenRecordListReqDto = new QuerySchemeOpenRecordListReqDto();
        querySchemeOpenRecordListReqDto.setConfSchemeTypeCode("CORE_APP");//sourceId:104326_1
        querySchemeOpenRecordListReqDto.setApplObjType("EVA_THEME");//sourceId:104454_1
        querySchemeOpenRecordListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:104448_1
        if (reqDto != null) {
            querySchemeOpenRecordListReqDto.setTenantSpaceId(reqDto.getTenantSpaceId());//sourceId:104324_1
        }

        /*D2-3查询方案开通记录列表[2104]   */
        querySchemeOpenRecordListRespDto = fwCompSchemeOpenRecordClient.querySchemeOpenRecordList(querySchemeOpenRecordListReqDto).getData();


        BffQueryThemeSchemeOpenRecordListBorderRespDto retData = new BffQueryThemeSchemeOpenRecordListBorderRespDto();
        retData.setSchemeOpenRecordList(querySchemeOpenRecordListRespDto.getSchemeOpenRecordList().stream().map(item -> BeanUtil.toBean(item, BffSchemeOpenRecordDto.class)).collect(Collectors.toList()));//sourceId:114606_1


        return retData;
    }

    /**
     * B2-3发布方案开通记录(管理)[4118]
     * gen by moon at 8/17/2022, 7:39:42 PM
     */
    @Trace(operationName = "B2-3发布方案开通记录(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffReleaseSchemeOpenRecordRespDto releaseSchemeOpenRecord(BffReleaseSchemeOpenRecordReqDto reqDto) {


        //步骤0: D2-3发布方案开通记录(公共) - releaseSchemeOpenRecordCom
        ReleaseSchemeOpenRecordComRespDto releaseSchemeOpenRecordComRespDto = null;
        ReleaseSchemeOpenRecordComReqDto releaseSchemeOpenRecordComReqDto = new ReleaseSchemeOpenRecordComReqDto();
        if (reqDto != null) {
            releaseSchemeOpenRecordComReqDto.setSchOpenRecordId(reqDto.getSchOpenRecordId());//sourceId:234362_1
        }

        /*D2-3发布方案开通记录(公共)[4119]   */
        Assert.isNull(releaseSchemeOpenRecordComReqDto.getSchOpenRecordId(), "B2-3发布方案开通记录(管理)-D2-3发布方案开通记录(公共)-方案开通记录ID不能为空", false);
        releaseSchemeOpenRecordComRespDto = fwCompSchemeOpenRecordClient.releaseSchemeOpenRecordCom(releaseSchemeOpenRecordComReqDto).getData();


        BffReleaseSchemeOpenRecordRespDto retData = new BffReleaseSchemeOpenRecordRespDto();


        return retData;
    }

    /**
     * B2-3更新方案开通记录(管理)[3124]
     * gen by moon at 9/13/2022, 6:23:44 PM
     */
    @Trace(operationName = "B2-3更新方案开通记录(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffRefreshSchemeOpenRecordRespDto refreshSchemeOpenRecord(BffRefreshSchemeOpenRecordReqDto reqDto) {


        //步骤0: D2-3更新方案开通记录扣减(公共) - refreshSchemeOpenRecordDeductionCom
        RefreshSchemeOpenRecordDeductionComRespDto refreshSchemeOpenRecordDeductionComRespDto = null;
        RefreshSchemeOpenRecordDeductionComReqDto refreshSchemeOpenRecordDeductionComReqDto = new RefreshSchemeOpenRecordDeductionComReqDto();
        refreshSchemeOpenRecordDeductionComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:108846_1
        if (reqDto != null) {
            refreshSchemeOpenRecordDeductionComReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//sourceId:108845_1
        }

        /*D2-3更新方案开通记录扣减(公共)[3104]   */
        Assert.isNull(refreshSchemeOpenRecordDeductionComReqDto.getConfSchemeCode(), "B2-3更新方案开通记录(管理)-D2-3更新方案开通记录扣减(公共)-配置方案标识不能为空", false);
        Assert.isNull(refreshSchemeOpenRecordDeductionComReqDto.getTenantSpaceId(), "B2-3更新方案开通记录(管理)-D2-3更新方案开通记录扣减(公共)-租户空间ID不能为空", false);
        refreshSchemeOpenRecordDeductionComRespDto = fwCompSchemeOpenRecordClient.refreshSchemeOpenRecordDeductionCom(refreshSchemeOpenRecordDeductionComReqDto).getData();


        BffRefreshSchemeOpenRecordRespDto retData = new BffRefreshSchemeOpenRecordRespDto();


        return retData;
    }

    /**
     * B3-3新增模板方案配置关系(管理)[3125]
     * gen by moon at 5/14/2023, 10:25:03 PM
     */
    @Trace(operationName = "B3-3新增模板方案配置关系(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddTempSchemeConrelRespDto addTempSchemeConrel(BffAddTempSchemeConrelReqDto reqDto) {


        AddEvaTempOpenRecordRespDto addEvaTempOpenRecordRespDto_1 = null;
//步骤0: D3新增评价模板开通记录 - addEvaTempOpenRecord
        AddEvaTempOpenRecordRespDto addEvaTempOpenRecordRespDto = null;
        AddEvaTempOpenRecordReqDto addEvaTempOpenRecordReqDto = new AddEvaTempOpenRecordReqDto();
        if (reqDto != null) {
            addEvaTempOpenRecordReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:896038_1
            addEvaTempOpenRecordReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:941167_1
            addEvaTempOpenRecordReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:941168_1
        }

        /*D3新增评价模板开通记录[6481]   */
        Assert.isNull(addEvaTempOpenRecordReqDto.getEvaluationTemplateId(), "B3-3新增模板方案配置关系(管理)-D3新增评价模板开通记录-评价模板ID不能为空", false);
        Assert.isNull(addEvaTempOpenRecordReqDto.getCycleStartTime(), "B3-3新增模板方案配置关系(管理)-D3新增评价模板开通记录-周期开始时间不能为空", false);
        Assert.isNull(addEvaTempOpenRecordReqDto.getCycleEndTime(), "B3-3新增模板方案配置关系(管理)-D3新增评价模板开通记录-周期结束时间不能为空", false);
        addEvaTempOpenRecordRespDto = fwAppEvaThemeClient.addEvaTempOpenRecord(addEvaTempOpenRecordReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        addEvaTempOpenRecordRespDto_1 = addEvaTempOpenRecordRespDto;

        BffAddTempSchemeConrelRespDto retData = new BffAddTempSchemeConrelRespDto();
        if (addEvaTempOpenRecordRespDto_1 != null) {
            retData.setSchOpenRecordId(addEvaTempOpenRecordRespDto_1.getSchOpenRecordId());//SimpleFieldAssign//sourceId:896042_1
            retData.setApplexRelId(addEvaTempOpenRecordRespDto_1.getApplexRelId());//SimpleFieldAssign//sourceId:896043_1
        }


        return retData;
    }

    /**
     * B2-3删除模板方案配置关系(管理)[4838]
     * gen by moon at 10/14/2022, 2:16:27 PM
     */
    @Trace(operationName = "B2-3删除模板方案配置关系(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeleteTempSchemeConrelRespDto deleteTempSchemeConrel(BffDeleteTempSchemeConrelReqDto reqDto) {


        //步骤0: D2-3删除模板方案配置关系 - deleteTempSchemeConrel
        DeleteTempSchemeConrelRespDto deleteTempSchemeConrelRespDto = null;
        DeleteTempSchemeConrelReqDto deleteTempSchemeConrelReqDto = new DeleteTempSchemeConrelReqDto();
        if (reqDto != null) {
            deleteTempSchemeConrelReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:377537_1
            deleteTempSchemeConrelReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:377538_1
        }

        /*D2-3删除模板方案配置关系[4837]   */
        Assert.isNull(deleteTempSchemeConrelReqDto.getConfSchemeCode(), "B2-3删除模板方案配置关系(管理)-D2-3删除模板方案配置关系-配置方案标识不能为空", false);
        Assert.isNull(deleteTempSchemeConrelReqDto.getEvaluationTemplateId(), "B2-3删除模板方案配置关系(管理)-D2-3删除模板方案配置关系-冗余评价模板ID不能为空", false);
        deleteTempSchemeConrelRespDto = fwCompSchemeOpenRecordClient.deleteTempSchemeConrel(deleteTempSchemeConrelReqDto).getData();


        BffDeleteTempSchemeConrelRespDto retData = new BffDeleteTempSchemeConrelRespDto();


        return retData;
    }
    //
}
